package Basepractice.P2017_10_31.Je020402;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * Created by Administrator on 2017/10/31.
 */
public class If_else {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("please input a 数");
        int score=0;
       try {
           score=scanner.nextInt();
       }catch (InputMismatchException e){
           System.out.println("数据类型不匹配！！！");
       }
        String f="不及格";
        //定义字符型变量
        if (score>=90&&score<=100)
        {f="优秀";}                                    //if语句大括号完毕里面有分号
        else if (score>=80&&score<=89)
        {f="良好";}
        else if (score>=70&&score<=79)
        {f="中等";}
        else if (score>=60&&score<=69)
        {f="及格";}
        System.out.println("成绩为"+f);

    }
}
